﻿using System;
using System.Collections.Generic;
using System.Text;
using OgilvyOne.Model;
using System.Collections;
using OgilvyOne.DALFactory;
using System.Data;

namespace OgilvyOne.BLL
{
    public class ContactUsBLL
    {
        /// <summary>
        /// 查询留言
        /// </summary>
        /// <param> </param>
        /// <returns></returns>
        public IList getContactus(ContactUsModel cum)
        {
            return ContactUsFactory.create().getContactus(cum);
        }
        /// <summary>
        /// 获取留言，回复信息
        /// </summary>
        /// <param> </param>
        /// <returns></returns>
        public IList getContactus(int contacttype)
        {
            return ContactUsFactory.create().getContactus(contacttype);
        }
        /// <summary>
        /// 删除单行留言
        /// </summary>
        /// <param> </param>
        /// <returns></returns>
        public bool deleteContactu(int CONTACT_ID)
        {
            return ContactUsFactory.create().deleteContactu(CONTACT_ID);
        }
        /// <summary>
        /// 删除多行留言
        /// </summary>
        /// <param> </param>
        /// <returns></returns>
        public bool DeleteContactus(string CID)
        {
            return ContactUsFactory.create().DeleteContactus(CID);
        }
        /// <summary>
        /// 查询一条留言
        /// </summary>
        /// <param> </param>
        /// <returns></returns>
        public ContactUsModel selectContactus(int CONTACT_ID)
        {
            return ContactUsFactory.create().selectContactus(CONTACT_ID);
        }
        /// <summary>
        /// 增加留言
        /// </summary>
        /// <param> </param>
        /// <returns></returns>
        public int Add(ContactUsModel cum)
        {
            return ContactUsFactory.create().Add(cum);
        }
        /// <summary>
        /// 回复留言（更新留言）
        /// </summary>
        /// <param> </param>
        /// <returns></returns>
        public int Update(ContactUsModel cum)
        {
            return ContactUsFactory.create().Update(cum);
        }
        public DataSet getContactusDs(ContactUsModel cum)
        {
            return ContactUsFactory.create().getContactusDs(cum);
        }
    }
}
